$(document).ready(function(){if(0<$(".listable-text").length){var currentUrl,currentPart,container=$(".listable-text"),parts=container.children(".listable-text-part"),withIntro=$(parts[0]).hasClass("intro"),partsCount=withIntro?parts.length-1:parts.length,firstPartNum=withIntro?0:1,lastPartNum=withIntro?parts.length-1:parts.length,initialized=!1,currentUrlSuffix="",adIframeElements=(Array.from(document.getElementsByClassName("js-advert__content")),Array.from(document.getElementsByClassName("design-iframe--advert"))),adReloader=new iinfo.adverts.Reloader(0,"","");function setupCurrentState(){var found=window.location.href.match(/^(.*?\/)p-(\d+)\/?([^/].*)?$/);if(null!==found)currentPart=parseInt(found[2]),currentUrl=found[1],void 0!==found[3]&&(currentUrlSuffix=found[3]);else{currentPart=firstPartNum;var url=new URL(window.location.href);currentUrl=url.protocol+"//"+url.hostname+url.pathname,currentUrlSuffix=url.search+url.hash}}function buildNavigation(location){var nav='
';nav+='Předchozí',nav+='Další',nav+='
',parts.length<=11?parts.each(function(i,p){withIntro||(i+=1),nav+=''+(0===i?"Úvod":i)+''+partsCount+""}):nav+='',nav+="
",nav+="
","top"===location&&container.prepend(nav),"bottom"===location&&container.append(nav)}function switchPart(number){$(".listable-text-part").hide(),parts.eq(withIntro?number:number-1).fadeIn(),number!=currentPart&&(firstPartNum<(currentPart=number)||initialized&¤tPart===firstPartNum)&&window.history.pushState({},"",currentUrl+(currentPart==firstPartNum?"":"p-"+currentPart+"/")+currentUrlSuffix)}navPrevCallback=function(event){event.preventDefault(),firstPartNum$(".listable-text-nav.top").offset().top&&$("html, body").animate({scrollTop:$(".listable-text").offset().top},200));var singleNavButton=$(".single-nav-btn");0